//
//  XMarkButton.swift
//  memo
//
//  Created by DaleGuo on 2023/10/7.
//

import SwiftUI

/// 通用化
struct XMarkButton: View {
    @Environment(\.dismiss) var dismiss

    var body: some View {
        Button(action: {
            dismiss()
        }, label: {
            Image(systemName: "xmark")
                .font(.headline)
                .foregroundStyle(Color.primary)
        })
    }
}

#Preview {
    XMarkButton()
}
